<template>
  <div class="apiDetial w-e-text" v-html="info"></div>
</template>

<script>
export default {
  name: "apiDetial",
  watch:{
    '$route.query.id':{
      handler:function(v){
        if(v){
          this.getApiDetial()
        }
      },
      immediate:true
    },
  },
  data(){
    return {
      info:''
    }
  },
  methods:{
    getApiDetial(){
      let params = {
        id:this.$route.query.id
      }
      this.$api.getApiDetial(params).then(res=>{
        this.info = res.data.apiDesc
      })
    },
  },
}
</script>

<style scoped lang="less">

.apiDetial{
  padding: 40px 70px;
  width: calc(100% - 140px);
  min-height: 700px;
  background-color: white;
}

/deep/table{
  border-collapse: collapse;
  td , th {
    border: 2px solid #ccc;
    padding: 10px;
  }
  th{
    background-color: #f1f1f1;
  }
}
/deep/code{
  background-color: #f1f1f1;
}
/deep/pre{
  background-color: #f1f1f1;
  padding: 10px;
}
</style>